<?php

require __DIR__.'/../vendor/autoload.php';
require_once  __DIR__.'/../app.php';

App::getContainer()->bind(\Psr\Http\Message\RequestInterface::class,function (){
   return \core\http\Request::create($_SERVER);
});

//echo App::getContainer()->get(\Psr\Http\Message\RequestInterface::class)->getMethod();

App::getContainer()->get('response')->setContent(
    App::getContainer()->get('router')->dispatch(
        App::getContainer()->get(\Psr\Http\Message\RequestInterface::class)
    )
)->send();